package com.future.admin.controller;

import com.future.admin.service.SysMenuService;
import com.future.common.api.result.R;
import com.future.common.security.annoation.Ignore;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: liuby5
 * @CreateTime: 2023-06-05  11:27
 * @Description:
 * @Version: 1.0
 */
@RestController
@RequestMapping("/sys-menu")
@Slf4j
public class SysMenuController {
    @Resource
    private SysMenuService sysMenuService;

    @GetMapping("/login-menu-tree")
    public R getLoginMenu(){
        return sysMenuService.getMenuTree(true);
    }


    @Ignore
    @GetMapping("/create-table")
    public R createNewTable(){
        return sysMenuService.createnewTable();
    }
}
